@database Trashmaster.guide @Master Trashmaster.texinfo @Width 76 This is the AmigaGuide file Trashmaster.guide, produced by Makeinfo-1.55 from the input file Trashmaster.texinfo. @Node Main "Trashmaster.guide" TRASHMASTER V1.7 The @{i}ultimate@{ui} in byte disposal for the Amiga. Copyright (C) 1994 By Aric R Caley and Greywire designs 3 July 1994 @{" Who what where when why " Link "Who what where when why"} @{" How " Link "How"} @{" Installation " Link "Installation"} @{" Usage " Link "Usage"} @{" Options " Link "Options"} @{" Wish list " Link "Wish list"} @{" Formats and Templates " Link "Formats and Templates"} @EndNode @Node "Who what where when why" "Trashmaster.guide/Who what where when why" @Next "How" @Prev "Main" @Toc "Main" Who, what, where, when, why *************************** Written by Aric R Caley, AKA Dances V2.0, Dances With Coyotes, Major, Mr Coyote, and other handles/nicknames. :) See the readme file if you wish to contact me. See @{"Readme" Link "readme.guide/main"}! WHERE ===== Best place is in your WBStartup drawer! The current version, 1.7, was released on 3 July 1994. The first public release of Trashmaster was Jan 23 1992. I had always wanted to write something like this but until now, I couldnt do it. Not that it was particularly easy to do, even under Workbench 2.0. @EndNode @Node "How" "Trashmaster.guide/How" @Next "Installation" @Prev "Who what where when why" @Toc "Main" How I did it ************ The main problem is with getting finicky old Workbench to stay "in sync" with the filing system.. IE, removing its icons when a file is deleted. Thanks to a new function called @{b}DeleteDiskObject()@{ub}, it's possible to get workbench to remove an icon. Unfortunately Workbench still is kinda brain-dead... when you have it display ALL files, it spontaneously creates icons in memory for files that dont have them... which results in @{b}DeleteDiskObject()@{ub} not working (no file on disk) and Workbench not removeing the icon. The only solution I could come up with is to @{b}PutDiskObject()@{ub} and then delete this icon, which works more or less pretty well. There are still, however, problems. Workbench, it seems, will "lock" a directory if its window is open on the Workbench screen. This means I can't delete it until it's closed... not too big a deal, since when you delete the icon the window closes automaticaly. But what if something @{i}else@{ui} has that directory locked? Then I couldn't delete it after all... that means I need to put the icon back! heheh. But I think I've come up with a good solution. Another problem is that there's no way to find out where the AppIcon is, within the WorkBench window -- so there is no way to implement a snapshot option within your application (of course, the root problem is that Workbench doesn't provide any way to "hook" into the Workbench operations like snapshot, info, etc. See below for my solution to this). Finaly, one last problem exists that I couldn't fix. If you drop a drawer onto Trashmaster that does not have a directory (but obviously has an .info), then Trashmaster can't delete it. The reason why is that Workbench tries to get a lock on any directory icons, which it passes to Trashmaster, but since there is no directory it can't lock it. So Trashmaster gets a message with no arguments and it can't figure things out. This is only a minor problem. This seems like a good place to voice some opinions on Workbench 2.0, and what I'd like to see in the future. @{"Wish list" Link "Wish list"} @EndNode @Node "Wish list" "Trashmaster.guide/Wish list" @Next "Formats and Templates" @Prev "Options" @Toc "Main" Wish list ********* @{b}*@{ub} DiskObjects should be a BOOPSI class. @{b}*@{ub} An "icon" class would have methods for all the normal Workbench operations; like info, double click, delete, snapshot, copy/move, etc. That way, an AppIcon could give an "about" requester with the info menu function, and behave in every way just like a regular icon. Say you had an icon for a network machine... info could put up a requester saying what the node's name was, CPU class, whether it was Ethernet or serial, etc. neat huh? A Drawer could open it's own type of list window.. perhaps one with a "tree" display. You could replace the standard operation with new ones (via hooks into the DiskObject class). This makes Workbench extremely flexible and extendable and would allow third party people to add tons of functionality to Workbench (I should be able to make Workbench as powerfull as DiskMaster or DirOpus!) @{b}*@{ub} This BOOPSI icon would be able to have more than just a bitmap image; like actual structured drawing objects. Of course, this introduces the problem of how to store objects on disk. @{b}*@{ub} @{i}Any@{ui} application would now be able to use icons easily (they dont have to have anything to do with Workbench). You could even drag icons @{i}from@{ui} an application @{i}to@{ui} a Workbench window to save a file... @{b}*@{ub} Clipboard support, with a "view clipboard" window. Cut and paste icon names/file names, icon images, etc. @{b}*@{ub} Definable default tools for projects, with file recognition so it knows what tool to run (in case there's no icon or the normal tool can't be found). And how about a small database that contains application names and then a path to where it is? Actualy, I guess you could have a "Applications" directory, with icons that are linked to wherever the app is -- and Workbench would check here first for tools. @{b}*@{ub} "Left out" icons could be done in the same way, so that the app's icon is still visible in it's Drawer, and so that Snapshoting the left out icon doesn't ruin it's original coordinates. @{b}*@{ub} Something needs to be done about the list windows.. they are slow and clumsy, and are missing what I think is a great feature: a "Tree" mode. @{b}*@{ub} Better tracking of when other apps change/add/delete files. @{b}*@{ub} ARexx interface! @{b}*@{ub} Built in Trashmaster :) Built in ToolManager-like features. OK, I'll step down off my soapbox now! Anyone want to help me write a Workbench replacement? No matter, I'll just do it myself.. :) I think I will code name it - "Encino"! In the tradition of Microsoft ("Chicago", "Cairo", etc). Maybe I'll put in a Windows NT emulation mode (a simple AllocMem(15000000,MEMF_ANY) and a busy loop to slow things down... :). @EndNode @Node "Installation" "Trashmaster.guide/Installation" @Next "Usage" @Prev "How" @Toc "Main" Installing Trashmaster ********************** Installing Trashmaster is simple. Just copy Trashmaster into your "WBStartup" drawer on your boot disk. If you want to run Trashmaster in a language other than english, check in the "catalogs/" directory for your language (you want the directory, not the *.ct file). If it's there, then copy it to "LOCALE:catalogs/", or to whatever directory you put Trashmaster into. If your language isn't there, then perhaps you could send me a translation and I'll put it in the next release. @EndNode @Node "Usage" "Trashmaster.guide/Usage" @Next "Options" @Prev "Installation" @Toc "Main" Using Trashmaster ***************** Usage ===== Trashmaster can be run from Workbench or the command line. All options can be specified either from Tooltypes or from the command line (see @{"Options" Link "Options"}). Obviously, Workbench must be running (and will be, unless you were naughty and modified your startup-sequence). Trashmaster will open an icon on the Workbench screen; this icon will look the same as the icon you ran Trashmaster from. BTW, the icon is supposed to look like a black hole... If you want to be able to format disks with Trashmaster, you must have @{b}WBStart-Handler@{ub} installed in your @{b}L:@{ub} directory. The @{b}WBStart-Handler@{ub} is included with ToolManager, a must-have utility, or in it's own separate distribution, both of which should be available on a Fish disk or any good FTP site, or failing that, from me. ToolManager and WBStart are Copyright (C) 1991-94 Stefan Becker. The default formating program is the same as Workbench's formatter. To use Trashmaster, simply drag files and drop them on the icon. A requester will come up, similar to Workbench's Delete confirmation requester. If you really want to delete the file(s) or dir(s), click @{b}OK@{ub}; if not, hit @{b}CANCEL@{ub}. Remember, once you hit @{b}OK@{ub}, the files are deleted.. they're @{i}gone@{ui}! For reals. Not like the Trashcan. If you have the @{b}VERIFYOFF@{ub} tooltype set, you @{i}won't@{ui} get this requester! One difference from the Workbench Delete, is the extra option for Interactive deletion. With interactive delete, you will get a confirmation requester for each file you dropped into Trashmaster. For each file, you can choose to either delete it, delete all the rest of the files non-interactively, skip this file, or abort completely. If Trashmaster comes across a file that is protected from deletion, it will bring up a requester with two options, @{b}FORCE@{ub} and @{b}CANCEL@{ub}. If you select @{b}FORCE@{ub}, Trashmaster will un-protect the file and delete it! Selecting @{b}CANCEL@{ub} will of course cancel the operation. If you have the @{b}FORCE@{ub} option set, you @{i}won't@{ui} get this requester, the file will simply be deleted without warning. To quit Trashmaster (which you dont really want to do, do you? :), double click the AppIcon and select the remove option. If you want Trashmaster started automaticly (you DO, dont you?), place it into the "WBStartup" drawer on your boot disk. @EndNode @Node "Options" "Trashmaster.guide/Options" @Next "Wish list" @Prev "Usage" @Toc "Main" Options ******* For a description of the Format and Template lines used below, see @{"Formats and Templates" Link "Formats and Templates"}. @{b}Format: ICON @{ub} @{b}Template: ICON/K@{ub} This is the name of a custom icon to be used instead of the default icon (the default being Trashmaster's icon) @{b}Format: NAME @{ub} @{b}Template: NAME/K@{ub} Set this to change the name under Trashmaster's AppIcon. @{b}Format: FORMATTER @{ub} @{b}Template: FORMATTER/K@{ub} Set to the name of the disk-formatting program of your choice. The program will be started as a Workbench application and passed the disk icon to format. @{b}Format: VERIFYOFF@{ub} @{b}Template: VERIFYOFF/S@{ub} If set, the initial verification requester will @{i}not@{ui} appear. The action performed will be the one defined by the @{b}TYPE@{ub} tooltype. Use at your own risk. @{i}Note:@{ui} This tooltype has been changed from previous versions of Trashmaster. @{b}Format: TYPE = @{ub} @{b}Template: TYPE/K@{ub} Applicable only when @{b}VERIFYOFF@{ub} is set. If set to @{b}INTERACTIVE@{ub}, deletes will default to interactive deletes (requireing confirmation for every file and directory). @{b}Format: FORCE@{ub} @{b}Template: FORCE/S@{ub} If set, files that have their protection flags set to delete-protected will be deleted without warning. Otherwise, you'll get a requester whenever you try to delete a protected file. @{i}Note:@{ui} This tooltype has been changed from previous versions of Trashmaster. @{b}Format: X @{ub} @{b}Template: X/N@{ub} This is the X coordinate of the AppIcon. A -1 will tell workbench to find a suitable place for the icon. @{b}Format: Y @{ub} @{b}Template: Y/N@{ub} This is the Y coordinate of the AppIcon. A -1 will tell workbench to find a suitable place for the icon. @{b}VERIFYOFF@{ub}, @{b}TYPE@{ub} and @{b}FORCE@{ub} can work in conjuction. If you don't want @{i}any@{ui} anoying verification requesters, you can set @{b}VERIFYOFF@{ub}, @{b}TYPE@{ub} to nothing (leave it out), and @{b}FORCE@{ub}. If you always want interactive deletes, set @{b}VERIFYOFF@{ub} and @{b}TYPE@{ub} to @{b}INTERACTIVE@{ub}. Be carefull with these! If you turn off verification and use the @{b}FORCE@{ub} option, anything that gets dropped on TrashMaster will be simply deleted without warning, even if it's protected from deletion. @EndNode @Node "Formats and Templates" "Trashmaster.guide/Formats and Templates" @Prev "Wish list" @Toc "Main" Formats and Templates ********************* Format ====== Commands are described with a Format and a Template. In a Format specification, the arguments are surounded by brackets to indicate the type of argument. The brackets are not typed as part of the command. @{b}< >@{ub} Angle brackets are used to indicate that this argument is @{i}required@{ui}; it must be provided or the command will fail. @{b}[ ]@{ub} Square brackets indicate that the argument is optional. The command will run with or without these arguments. @{b}{ }@{ub} Braces indicate that this argument may be given more than once. @{b}|@{ub} The vertical bar separates multiple options, only one of which may be specified (mutualy exclusive). Template ======== Templates are a more compact, concise version of Formats (both have their uses). Templates are directly supported by the Amiga OS. Their main advantage is that they specify the type of data each argument will (should) be. Each argument is separated with a comma, and has a specifier code at the end (always a '/' with a letter). These are the codes currently supported: @{b}/A@{ub} Always required. This argument MUST be given or the command will fail. This is equivalent to the Format specifier @{b}"< >"@{ub}. @{b}/F@{ub} Final argument. The entire rest of the line, regardless of any keywords or spaces that may appear in it, is taken as the argument string. @{b}/K@{ub} Keyword. This option will only be filled if this keyword appears in the command line. @{b}/M@{ub} Multiple arguments. This argument will accept any number of strings. Anything not matching another option will be added to this option. Only one /M will be specified. @{b}/N@{ub} Number. The argument is a decimal number. @{b}/S@{ub} Switch. The argument is a boolean switch. If it is specified, the option is true, if it is missing, the option is false (default). @{b}=@{ub} This is used to provide an abbreviation. @{b}OPT=OPTION@{ub} means that this option can be specified with either @{b}OPT@{ub} or @{b}OPTION@{ub}. If for some reason you need to specify an argument string (for instance, a file name) that is the same as one of the options, enclose it in quotes. For example: Hypothetical command Template: SHOW NAME/A You type at the shell: @{b} >show name "name"@{ub} If you had a file called "name" (I won't ask why... ), that is how you'd do it. @EndNode